gtktextattributes: Use an anonymous union instead of arch-testing #ifdef
authorColin Walters <walters@verbum.org>
Wed, 30 Oct 2013 15:26:48 +0000 (11:26 -0400)
committerColin Walters <walters@verbum.org>
Sun, 3 Nov 2013 16:15:43 +0000 (11:15 -0500)
This avoids having Gtk-3.0.gir differ on 32 vs 64 bit, which causes
issues for "multilib" in Fedora/OpenSUSE type systems.

See https://bugzilla.gnome.org/show_bug.cgi?id=711153 for more
information.

https://bugzilla.gnome.org/show_bug.cgi?id=711158

gtk/gtktextattributes.h

index d712dbe20bfe64db58040cc756cddceef458f685..616fc8b24c44ce6959df1be14f6209c01f01c8b4 100644 (file)
@@ -94,12 +94,10 @@ struct _GtkTextAppearance
   guint inside_selection : 1;
   guint is_text : 1;
 
-  GdkRGBA *rgba[2];
-
-#if (defined(__SIZEOF_INT__) && defined(__SIZEOF_POINTER__)) && (__SIZEOF_INT__ == __SIZEOF_POINTER__)
-  /* unusable, just for ABI compat */
-  guint padding[2];
-#endif
+  union {
+    GdkRGBA *rgba[2];
+    guint padding[4];
+  };
 };
 
 /**